<template>
  <view class="h5">
    <web-view :webview-styles="webviewStyles" :src="url"></web-view>
  </view>
</template>

<script>
import { buildStrParams } from "@/utils/http";
export default {
  data() {
    return {
      url: "",
      webviewStyles: {
        progress: {
          color: "#FF3333",
        },
      },
    };
  },
  onLoad(params) {
    const { url, q } = params;
    this.url =
      decodeURIComponent(url) + (q ? buildStrParams(JSON.parse(q)) : "");
  },
};
</script>